//
// Created by jsjxsy on 2022/8/19.
//operator type() const;
//
#include <iostream>
using namespace std;
#include <cctype>
class SmallInt {
 public:
  SmallInt(int val = 0) : val(val) {
    if (val < 0 || val > 255) {
      throw std::out_of_range("bad smallInt value");
    }
  }
  operator int() { return val; }
 private:
  size_t val;
};
int main() {
  SmallInt t1;
  t1 = 3;
  t1 = t1 + 4;
  cout << "t1=" << t1 << endl;
  SmallInt t2;
  t2 = 5;
  SmallInt t3;
  t3 = t2 + t1;
  cout << "t3=" << t3 << endl;
  SmallInt t4 = 3.14;
  cout << "t4=" << t4 << endl;
  //double t5 = t4 + 3.14;
  float t5 = t4 + 3.14;
  cout << "t5=" << t5 << endl;
  return 0;
}
